import React, {Component} from 'react';
import Tabbar from '../components/Tabbar'
import './CSS/App.css'
import {connect} from "dva";

class App extends Component {

  componentDidMount() {
    // console.log(this.props)
  }

  render() {
    return (
      <div>
        {/* 利用插槽的方式插入路由 */}
        {this.props.children}
        {this.props.isShow && <Tabbar/>}
      </div>
    );
  }
}

// 用 connect 高级组件作为父组件包装 App
export default connect(
  (state) => {
  // console.log(state)
  return {
    a: 1,
    isShow: state.tabbarShow.isShow
  }
}
)(App)
